/*
* 文章 - api
*
*/

import { postRequest, getRequest } from '@/lib/axios';

export const articleApi = {
    /*
    * 创建文章
    *
    */
    create: (params) => {
        return postRequest('/api/private/article/create', params);
    },

    /**
     *  查询所有文章信息
     * 
    */
    list: (params) => {
        return postRequest('/api/private/article/list', params);
    },

    /**
     *  根据id查询文章信息
     * 
    */
    findOne: (params) => {
        return postRequest('/api/private/article/findOne', params);
    },

    /**
     *  更新文章信息
     * 
    */
    update: (params) => {
        return postRequest('/api/private/article/update', params);
    },

    /**
     *  删除文章信息
     * 
    */
    delete: (params) => {
        return postRequest('/api/private/article/delete', params);
    },

    /**
     *  删除所有文章信息
     * 
    */
    deleteAll: () => {
        return postRequest('/api/private/article/deleteAll');
    },
}